﻿using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
using XYAC.Framework.MonitorTireMaterialOnline.Entities;

namespace XYAC.Framework.MonitorTireMaterialOnline.OracleRemoteDB
{
    /// <summary>
    /// 头表
    /// </summary>
    [Table("YB_TECHNOLOGY_HEADER")]
    public class YB_Technology_Header : EntityBase<long>
    {
        [Key]
        public long LJ_ID { get; set; } // 自增，无需写入
        public string? EQP { get; set; } // VARCHAR2(20)

        public string? EQP_TYPE { get; set; } // VARCHAR2(80) 机型
        public int? VERSION_ID { get; set; } // NUMBER 更新标记位
        public string? RECIPE_NAME { get; set; } // VARCHAR2(80)
        public string? BOM_NAME { get; set; } // VARCHAR2(80) 规格名称
        public string? BOM_REVSION { get; set; } // VARCHAR2(40)
        public string? IS_ACTIVE { get; set; } // VARCHAR2(8) 启用状态（1-启用，0-失效)
        public DateTime? RECEIVE_DATE { get; set; } // DATE
        public string? RECEIVE_FLAG { get; set; } = "PENDING"; // VARCHAR2(20)
        public DateTime? CREATION_DATE { get; set; } // DATE

        [NotMapped]
        [Obsolete("This property should not be used.", true)]
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Browsable(false)]
        [JsonIgnore]
        public override bool? IsDeleted { get; set; }

        [NotMapped]
        [Obsolete("This property should not be used.", true)]
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Browsable(false)]
        [JsonIgnore]
        public override long ID { get; set; }
    }
}
